package com.lzq.course.business.controller.admin;

import com.lzq.course.server.dto.SmsDto;
import com.lzq.course.server.dto.PageDto;
import com.lzq.course.server.dto.ResponseDto;
import com.lzq.course.server.service.SmsService;
import com.lzq.course.server.util.ValidatorUtil;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin/sms")
public class SmsController {

    public static final String BUSINESS_NAME = "短信验证码";

    @Resource
    private SmsService smsService;

    /**
     * 查询列表 分页查询
     * @param pageDto
     * @return
     */
    @PostMapping("/list")
    public ResponseDto list(@RequestBody PageDto<SmsDto> pageDto) {
        ResponseDto responseDto = new ResponseDto();
        smsService.list(pageDto);

        responseDto.setContent(pageDto);
        return responseDto;
    }
}
